<!--{template header}-->

<!--{template cp_pm_left}-->
<div class="uc_con">
	<!--{if $_GET['op'] == 'delete'}-->

		<h1>删除短消息</h1>
		<a href="javascript:hideMenu();" class="float_del" title="关闭">关闭</a>
		<div class="popupmenu_inner" id="$pmid">
		<form id="pmform" name="pmform" method="post" action="cp.php?ac=pm&op=delete&folder=$folder&pmid=$pmid">
			<p>确定删除指定的短消息吗？</p>
			<p class="btn_line">
				<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
				<input type="hidden" name="deletesubmit" value="true" />
				<input type="submit" name="deletesubmit" value="确定" class="submit" />
			</p>
			<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
		</form>
		</div>
	<!--{else}-->
		<!--{if !$_SGLOBAL[inajax]}-->

		<!--<div class="tabs_header">
				<ul class="tabs">
					<li class="active"><a href="cp.php?ac=pm"><span>短消息</span></a></li>
					<li><a href="space.php?do=pm&view=inbox"><span>返回收件箱</span></a></li>
				</ul>
			</div> -->
			<div class="tab" id="uc_mes">
				<div class="tab_cate">
					<ul>
						<li class="cate_selected"><a href="cp.php?ac=pm">发消息</a></li>
						<li><a href="space.php?do=pm&view=inbox">返回收件箱</a></li>
					</ul>
				</div>
			</div>

		<!--{else}-->

			<h1>发短消息</h1>
			<a href="javascript:hideMenu();" title="关闭" class="float_del">关闭</a>

		<!--{/if}-->
		<div class="popupmenu_inner" id="__pmform_{$pmid}" style="padding-top:15px;">
			<form id="pmform_{$pmid}" name="pmform_{$pmid}" method="post" action="cp.php?ac=pm&op=send&touid=$touid&pmid=$pmid" class="ajaxshowdiv">
				<table cellspacing="3" cellpadding="3">
				<!--{if !$touid}-->
				<tr>
					<th><label for="username">收件人：</label></th>
					<td>
						<script type="text/javascript" src="source/script_autocomplete.js"></script>
						<script type="text/javascript">
							function hidden_text(id){
								if(id=="group"){
									$("username").style.display='none';
									$("group").style.display='block';
									$('username_menu').style.display='none';
								}else{
									$("group").style.display='none';
									$("username").style.display='block';
									$('group_menu').style.display='none';
								}
							}
						</script>
						<input type="text" id="username" name="username" value="" style="width: 396px; display:block;" class="t_input" tabindex="1" <!--{if $friends}--> onclick="auc.handleEvent(this.value ,event);" onkeyup="auc.handleEvent(this.value ,event);" onkeydown="closeOpt(username,event);inputKeyDown(event);" autocomplete="off" <!--{/if}--> />

						<input type="text" id="group" name="group" value="" style="width: 396px; display:none;" class="t_input" tabindex="2" <!--{if $friends}--> onclick="kauc.handleEvent(this.value ,event);" onkeyup="kauc.handleEvent(this.value ,event);" onkeydown="kcloseOpt(username,event);kinputKeyDown(event);" autocomplete="off" <!--{/if}--> />

						<!--{if $friends}-->
						<div id="username_menu" class="ajax_selector" onclick="$('username_menu').style.display='none';" style="display:none">
							<div class="ajax_selector_option" style="width: 396px; height: 100px;">
								<a href="javascript:;" onclick="$('username_menu').style.display='none';" class="float_del" style="margin-right: 5px;">a</a>
								<ul id="friendlist" class="blocklink">
									<!--{loop $friends $key $value}-->
										<!--{eval $fs[] = $value['username'];}-->
										<li>$value[username]</li>
									<!--{/loop}-->
								</ul>
							</div>
						</div>
						<div id="group_menu" class="ajax_selector" onclick="$('group_menu').style.display='none';" style="display:none">
							<div class="ajax_selector_option" style="width: 396px; height: 100px;">
								<a href="javascript:;" onclick="$('group_menu').style.display='none';" class="float_del" style="margin-right: 5px;">a</a>
								<ul id="grouplist" class="blocklink">
									<!--{loop $groups $key $value}-->
										<!--{eval $gs[] = $value;}-->
										<li>$value</li>
									<!--{/loop}-->
								</ul>
							</div>
						</div>
						<!--{eval $friendstr = implode(',', $fs);}-->
						<!--{eval $groupstr = implode(',', $gs);}-->
						<script type="text/javascript">
							var close = true;
							var auc = new sAutoComplete("auc", "username_menu", "friendlist", "username");
							auc.addItem('$friendstr');
							function closeOpt(key,evt) {
								if(evt.keyCode==9) {
									$('username_menu').style.display='none';
								}
							}
							function inputKeyDown(event) {
								if(event.keyCode == 13){
									doane(event);
								}
							}
							var kauc = new sAutoComplete("kauc", "group_menu", "grouplist", "group");
							kauc.addItem('$groupstr');
							function kcloseOpt(key,evt) {
								if(evt.keyCode==9) {
									$('group_menu').style.display='none';
								}
							}
							function kinputKeyDown(event) {
								if(event.keyCode == 13){
									doane(event);
								}
							}
						</script>

						<!--{/if}-->
					</td>
					<td><input type="radio" name="sendtype" value="s_u" checked="true" onclick="hidden_text('username');" />按用户发送&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="sendtype" value="s_g" onclick="hidden_text('group');" />按组发送</td>
				</tr>
				<!--{/if}-->
				<tr>
					<th style="vertical-align: top;"><label for="message">内容：</label></th>
					<td><textarea id="message" name="message" cols="40" rows="4" style="width: 400px; height: 150px;" onkeydown="ctrlEnter(event, 'pmsubmit_btn');"></textarea></td>
				</tr>
				<tr>
					<th>&nbsp;</th>
					<td>
					<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
					<input type="hidden" name="pmsubmit" value="true" />
					<!--{if $_SGLOBAL[inajax]}-->
					<input type="button" name="pmsubmit_btn" id="pmsubmit_btn" value="发送" class="comp_sea_btn" onclick="ajaxpost('pmform_{$pmid}','',2000)" />
					<!--{else}-->
					<input type="submit" name="pmsubmit_btn" id="pmsubmit_btn" value="发送" class="comp_sea_btn" />
					<!--{/if}-->
					</td>
				</tr>
				</table>
				<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
			</form>
		</div>
	<!--{/if}-->
</div>

<!--{template footer}-->